import { cloneElement } from 'react'

const style = {
  width: '100%',
  maxWidth: 1200,
  marginLeft: 'auto',
  marginRight: 'auto',
  paddingLeft: '20px',
  paddingRight: '20px'
}

export default ({ children, rernderer = <div></div> }) => {
  return cloneElement(
    rernderer, {
    style: Object.assign({}, rernderer.props.style, style),
    children,
  }
  )
  // return (
  //   <Comp style={style}>
  //     {children}
  //   </Comp>
  // )
}